package com.dms.modules.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 优惠券实体
 */
@Data
@TableName("coupon")
@ApiModel("优惠券实体")
public class Coupon {
    
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("优惠券ID")
    private Long id;
    
    @ApiModelProperty("优惠券名称")
    private String name;
    
    @ApiModelProperty("优惠券类型：0-满减券 1-折扣券 2-无门槛券")
    private Integer type;
    
    @ApiModelProperty("优惠券面值")
    private BigDecimal value;
    
    @ApiModelProperty("最低消费金额")
    private BigDecimal minSpend;
    
    @ApiModelProperty("生效时间")
    private LocalDateTime startTime;
    
    @ApiModelProperty("失效时间")
    private LocalDateTime endTime;
    
    @ApiModelProperty("发行数量")
    private Integer amount;
    
    @ApiModelProperty("剩余数量")
    private Integer remain;
    
    @ApiModelProperty("商家ID，NULL表示平台券")
    private Long merchantId;
    
    @ApiModelProperty("分类ID，NULL表示全场通用")
    private Long categoryId;
    
    @ApiModelProperty("状态：0-未启用 1-已启用 2-已失效")
    private Integer status;
    
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;
    
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;
    
    @ApiModelProperty("是否删除")
    private Integer deleted;
} 